package geometry;

import java.util.ArrayList;

import materials.Material;
import textures.Texture;
import transformation.Matrix4f;

public class Shape {

	private Material material;
	private Texture texture;
	private ArrayList<Triangle> triangles;

	public Shape() {
	}

	public Material getMaterial() {
		return this.material;
	}

	public Texture getTexture() {
		return this.texture;
	}

	public ArrayList<Triangle> getTriangles() {
		return this.triangles;
	}

	public void setMaterial(Material material) {
		this.material = material;
	}

	public void setTexture(Texture texture) {
		this.texture = texture;
	}

	public void setTriangles(ArrayList<Triangle> triangles) {
		this.triangles = triangles;
	}

	public void traverseSceneGraph(Matrix4f matrix, Matrix4f inverseMatrix) {
		for (Triangle triangle : this.triangles) {
			triangle.traverseSceneGraph(matrix, inverseMatrix);
		}
	}
}
